package com.vastcom.cms.service;

import com.vastcom.cms.model.Carousel;
import com.vastcom.cms.model.News;
import com.vastcom.cms.model.Singlepage;
import com.vastcom.cms.model.Users;
import org.springframework.data.domain.Page;

import java.util.List;

public interface ManageService {
    News saveNews(News news);
    boolean deleteNews(String id);
    News geiNewsById(String id);
    List<News> getNewsList();
    Page<News>getNewsForPage(int page,int pagesize);
    Page<News> getNewsByPage(String cate,int page,int pagesize);

    Carousel saveCarousel(Carousel carousel);
    boolean deleteCarousel(String id);
    Carousel getCarousel(String id);
    List<Carousel> getCarouselList();

    String getCurrentUserId();  //从令牌环中获取userid
    String getCurrentRole();    //从令牌环中获取角色id

    Users saveUser(Users u);
    boolean deleteUser(String id);
    Users getUser(String id);
    Users getUserByUserNameAndPass(String username,String pass);
    boolean isExsistUserName(String username);


    Singlepage saveSinglepage(Singlepage singlepage);
    boolean deleteSinglepage(String id);
    Singlepage getSinglepage(String id);
    List<Singlepage> getSinglepageList();

}
